﻿using MobiSms.Enums;
using MobiSms.Infrastructure;
using System;
using System.Data.Linq.Mapping;

namespace MobiSms.DataModel
{
    [Table(Name = "T_Mobiles")]
    public class MessageMobileInfo : NotificationObject
    {
        #region Fields
        private string _guid = System.Guid.NewGuid().ToString();
        private string _messageGuid;
        private string _sendid;
        private string _mobile;
        private MobileStatusValue _status = MobileStatusValue.Succeed;
        private DateTime _time = DateTime.Now;
        private string _extension;
        #endregion

        #region Properties
        [Column(IsPrimaryKey = true)]
        public string Guid
        {
            get { return _guid; }
            set
            {
                _guid = value;
                RaisePropertyChanged(() => Guid);
            }
        }

        [Column]
        public string MessageGuid
        {
            get { return _messageGuid; }
            set
            {
                _messageGuid = value;
                RaisePropertyChanged(() => MessageGuid);
            }
        }

        [Column]
        public string SendId
        {
            get { return _sendid; }
            set
            {
                _sendid = value;
                RaisePropertyChanged(() => SendId);
            }
        }

        [Column]
        public string Mobile
        {
            get { return _mobile; }
            set
            {
                _mobile = value;
                RaisePropertyChanged(() => Mobile);
            }
        }

        [Column]
        public MobileStatusValue Status
        {
            get { return _status; }
            set
            {
                _status = value;
                RaisePropertyChanged(() => Status);
            }
        }

        [Column]
        public DateTime Time
        {
            get { return _time; }
            set
            {
                _time = value;
                RaisePropertyChanged(() => Time);
            }
        }

        [Column]
        public string Extension
        {
            get { return _extension; }
            set
            {
                _extension = value;
                RaisePropertyChanged(() => Extension);
            }
        }
        #endregion
    }
}
